cmake_minimum_required(VERSION 3.16)
project(event_bus LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_definitions(-DEVENT_BUS_BUILD_DLL)

add_library(event_bus SHARED
    event_bus.hpp
    event_bus.cpp
    proxy.h
    proxy.cpp
)
target_include_directories(event_bus PUBLIC src)

install(TARGETS event_bus
        LIBRARY  DESTINATION ${CMAKE_SOURCE_DIR}/install   # .so/.dylib
        ARCHIVE  DESTINATION ${CMAKE_SOURCE_DIR}/install   # .lib / .a
        RUNTIME  DESTINATION ${CMAKE_SOURCE_DIR}/install   # .dll / .exe
)

#dd_executable(test_cpp tests/test_push_pop.cpp)
#target_link_libraries(test_cpp PRIVATE event_bus)